/**
 * 类名称：Node   
 * 类描述：
 * 创建人：马腾
 * 创建时间：Nov 20, 2012 10:19:22 PM
 * 修改人：马腾
 * 修改时间：Nov 20, 2012 10:19:22 PM
 */
package com.mt.components.general {
	
	import mx.collections.ArrayCollection;
	
	public dynamic class Node {
		
		[Bindable]public var name:String;
		[Bindable]public var parent:Node;
		[Bindable]public var children:ArrayCollection;
		[Bindable]public var isSelected:Boolean = false;
		[Bindable]public var data:Object;
		[Bindable]public var icon:String;
		
		public function toString() : String {
			return "com.mt.components.general.Node [" + name + "]";
		}
		
		public function equals(obj:Object):Boolean {
			if(obj is Node){
				if(!data) {
					return (obj as Node).name == name;
				};
				return data.equals(obj.data);
			}
			return false;
		}
	}
	
}